<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%@ taglib prefix="d" uri="http://displaytag.sf.net"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>权限管理-权限查询</title>
<link href="resources/css/bootstrap.min.css" rel="stylesheet" />
<script type="text/javascript" src="resources/js/jquery.min.js"></script>
<script type="text/javascript" src="resources/js/bootstrap.min.js"></script>

<script type="text/javascript">
function deleteFunction(id){
	if(confirm("确定要删除权限吗？")){
		window.location="<%=basePath%>FunctionDeleteServlet?id="+id;
	}
}

</script>
</head>
<body>
<div>
	<ul class="breadcrumb" style="margin: 0px;">
			<li>系统管理</li>
			<li>权限管理</li>
			<li>权限查询</li>
		</ul>
	</div>
	<form action="FunctionQueryServlet" method="post" class="form-inline">
		<div class="row alert alert-info" style="margin: 0px; padding: 5px; ">
			<div class="form-group">
				<label>条件:</label> 
				<select name="type" class="form-control">
					<option value="">请选择</option>
					<option value="name" ${type=='name'?'selected':'' } >权限姓名</option>
					<option value="url" ${type=='url'?'selected':'' }>权限地址</option>
				</select> 
				<input type="text" name="keywords" class="form-control" value="${keywords }"  placeholder="请输入查询条件"/>
			</div>
			<input type="submit" class="btn btn-danger" value="查询"> 
			<a  href="FunctionAddServlet" class="btn btn-success" >添加权限</a>
		</div>
		<div class="row" align="right" style="padding: 15px;">

			<d:table name="${list}" pagesize="10"
				class="table table-hover table-condensed"
				requestURI="system/userQuery">
				<d:column property="id" title="权限编号"></d:column> 
				<d:column property="name" title="权限名称"></d:column>
				<d:column property="url" title="权限地址"></d:column>
				<d:column  href="FunctionUpdateServlet" paramId="id"  paramProperty="id" title="修改" value="修改"></d:column>
				<d:column  format="<a href=javascript:void(0) onclick=deleteFunction({0}) >删除</a>" property="id"  title="删除" ></d:column>
			</d:table>


		</div>
	</form>
</body>
</html>